﻿using System.Diagnostics;
using System.Threading;
using MC.Phone.Ads.Provider;
using Microsoft.Phone.Controls;

namespace MC.Phone.Ads.Example
{
    public partial class NextPage : PhoneApplicationPage
    {
        public NextPage()
        {
            InitializeComponent();
        }


        private void AdEngaged(object sender, AdEventArgs e)
        {
            Debug.WriteLine( Thread.CurrentThread.ManagedThreadId + "N.AdEngaged: {0}", e.AdProviderName);
        }

        private void NoAd(object sender, AdEventArgs e)
        {
            Debug.WriteLine( Thread.CurrentThread.ManagedThreadId + "N.NoAd: {0}", e.AdProviderName);
        }

        private void NewAd(object sender, AdEventArgs e)
        {
            Debug.WriteLine( Thread.CurrentThread.ManagedThreadId + "N.NewAd: {0}", e.AdProviderName);
        }

        private void AdError(object sender, AdErrorEventArgs e)
        {
            Debug.WriteLine( Thread.CurrentThread.ManagedThreadId + "N.AdError: {0},{1}", e.AdProviderName, e.Error.Message);
        }
    }
}